﻿using SBlogCore.Common.FluentValidatorExtend;

namespace SBlogCore.WebAdminApplication.SysOrgManager.Dto
{
    public class SysOrgInfoEditInPut: SysOrgInfoInPut
    {
        public long? Id { get; set; }
    }

    public class SysOrgInfoInPut
    {
        
        public string? Name { get; set; }
        public string? Code { get; set; }
        public long? ParentInfoId { get; set; }
    }
    public class MsgBody
    {
        public string link { get; set; }
        public string version { get; set; }
        public string updateMessage { get; set; }
    }

    /// <summary>
    /// 验证
    /// </summary>
    public class SysOrgInfoInPutValidator : SblogCoreAbstractValidator<SysOrgInfoInPut>
    {
        public SysOrgInfoInPutValidator()
        {
            RuleFor(x => x.Name).NotNull().WithMessage("名称不能为空");
            RuleFor(x => x.Code).NotNull().WithMessage("编码不能为空");
        }
    }

    public class SysOrgInfoEditInPutValidator : SblogCoreAbstractValidator<SysOrgInfoEditInPut>
    {
        public SysOrgInfoEditInPutValidator()
        {
            RuleFor(x => x.Id).NotNull().WithMessage("ID不能为空");
        }
    }
}
